<?php
// The \\2 is an example of backreferencing. This tells pcre that
// it must match the second set of parentheses in the regular expression
// itself, which would be the ([\w]+) in this case. The extra backslash is
// required because the string is in double quotes.
$a = "abcdef";
echo $a[1];
echo '<pre>';
$a = array();
$a['teste']=true;
if(!isset($a['teste'])) echo "not set test\n";
if(isset($a['teste'])) echo "isset test\n";
unset($a['teste']);
if(!isset($a['teste'])) echo "unset test\n";

$html = "<!doctype ><?xml><??n><h1><H1> <html lang><b>bold text</b><a href=howdy.html>click me</a>";

preg_match_all("/<[!?]?([\w]+)[^>]*>/", $html, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);

foreach ($matches as $m){
	echo str_replace('<', '&lt;', print_r($m, true));
}
echo '</pre>';
?>